﻿Imports Microsoft.Office.Interop
Imports System.IO

''' <summary>
''' Class that does SVN Commit changes of an access database files.
''' The logic is to SaveAsText all files and then bring up totroise svn commit window
''' </summary>
''' <remarks></remarks>
Public Class AccessDBCommitChanges

End Class


Public Class AccessDBExportandCompare

    Protected Overridable Property app As Access.Application

    Public Sub exportAndCompare()

        'For i = 0 To app.CurrentProject.AllMacros.Count - 1
        '    'Call SysCmd(acSysCmdSetStatus, _
        '    '        "Cheking Macro:" & app.CurrentProject.AllMacros.Item(i).Name & ", " & i & " of " & _
        '    '        Application.app.CurrentProject.AllMacros.Count)

        '    Dim filename As String = MACROS_FOLDER & app.CurrentProject.AllMacros.Item(i).Name & ".ACS"
        '    Dim filenameTmp As String = filename & "_"
        '    Call app.SaveAsText(Access.AcObjectType.acMacro, _
        '                app.CurrentProject.AllMacros.Item(i).Name, filenameTmp)

        '    Dim code As String = GetFileText(filename)
        '    Dim code2 As String = GetFileText(filenameTmp)

        '    If textDifferent(code, code2) Then
        '        If File.Exists(filename) Then
        '            File.Delete(filename)
        '        End If
        '        File.Move(filenameTmp, filename)
        '        Debug.Print("File Changed:" & filename)
        '    Else
        '        File.Delete(filenameTmp)
        '    End If

        '    Call xmlAddObjectTypeNode(app.CurrentProject.AllMacros.Item(i).Name, acMacro)

        'Next

    End Sub

    Private Function GetFileText(filename As String) As String
        Throw New NotImplementedException
    End Function

    Private Function textDifferent(code As String, code2 As String) As Boolean
        Throw New NotImplementedException
    End Function

End Class

